<?php
namespace BP\Port;

use BP\En\EntityNoName;

require_once("BP/En/Map.php");
class Station extends EntityNoName {
	public function getHisUAC () 
	{
		$uac = new UAC();
		$uac->OpenForSysAdmin();
		return $uac;
	}
	public function getName () 
	{
		return $this->GetValStrByKey("Name");
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String ($no) // [String no]
	{
		$me = new self();
		$me->setNo($no->trim());
		if (($me->getNo()->length() == 0))
		{
			throw new RuntimeException("@要查询的岗位编号为空�?");
		}
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Port_Station", "岗位");
		$map->Java_SetEnType($EnType->Admin);
		$map->Java_SetDepositaryOfMap($Depositary->Application);
		$map->Java_SetDepositaryOfEntity($Depositary->Application);
		$map->AddTBStringPK(EmpAttr::$No, NULL, "编号",  TRUE ,  FALSE , 4, 4, 4);
		$map->AddTBString(EmpAttr::$Name, NULL, "名称",  TRUE ,  FALSE , 0, 100, 100);
		$map->AddTBString(StationAttr::$OrgNo, NULL, "隶属组织编号",  TRUE ,  FALSE , 0, 100, 100);
		$this->set_enMap($map);
		return $this->get_enMap();
	}
}
?>
